<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{L('member','','member').L('manage_center')}</title>
<meta name="description" content="{L('member','','member').L('manage_center')}" />
<link href="{CSS_PATH}default/css/member-reset.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{JS_PATH}Dialog/main.js"></script>
<script type="text/javascript" src="{CSS_PATH}bootstrap/js/bootstrap.min.js"></script>
<script src="{JS_PATH}cms.js" type="text/javascript"></script>
<script type="text/javascript" src="{JS_PATH}member_common.js"></script>
<script type="text/javascript" src="{JS_PATH}layer/layer.js"></script>
</head>
<body>
<div class="w1">
	<div class="w880 head">
	  <div class="right"><a href="{APP_PATH}">回到首页</a></div>
	  <a href="{APP_PATH}index.php?m=member&c=index&a=register&siteid={$siteid}" class="current">注册</a> 欢迎登录
	</div>
</div>
<!--主要内容-->
<div class="main">
  <h1>{L('use_mobile_get_password')}</h1>
  {if $step==1}
  <div class="main_left">
		<div class="title">
		<span>{L('步骤：1. 用户名确认 &nbsp;&nbsp;>&nbsp;&nbsp; 2. 手机号码确认 &nbsp;&nbsp;>&nbsp;&nbsp; 3. 手机收到新密码')}</span>
		</div>	
		<div class="form">
		<form method="post" action="" id="myform">
		{dr_form_hidden()}
		  <ul>
		  <li>{L('请输入用户名')}：<input type="text" placeholder="{L('请输入用户名')}" required name="username" class="input"/></li>
		  <li>{L('checkcode')}：<input type="text" placeholder="{L('checkcode')}" required name="code" class="input code"/>{form::checkcode('code_img', '4', '14', 80, 24)}</li>
		  <li><input type="submit" name="dosubmit" value="下一步"  class="submit"> <a href="?m=member&c=index&a=public_get_password_type">重新选择验证方式</a></li>
		  </ul>
		  <input type="hidden" name="step" value="2">
		  </form>
						
		</div>				
  </div>
  {else}
  <div class="main_left">
		<div class="title">
		<span>{L('步骤：1. 用户名确认 &nbsp;&nbsp;>&nbsp;&nbsp; 2. 手机号码确认 &nbsp;&nbsp;>&nbsp;&nbsp; 3. 手机收到新密码')}</span>
		</div>	
		<div class="form">
		<form method="post" action="" id="myform">
		{dr_form_hidden()}
		  <ul>
		  <li>{L('您绑定的手机号码为')}：{substr($r['mobile'],0,3)}****{substr($r['mobile'],-3)}</li>
		  		  <li><span id="mobile_div"><button onclick="get_verify()" type="button" class="submit">获取短信校验码</button></span></li>
		  <li><span id="mobile_send" style="display:none">，短信已发送成功，请查收，短信如在10分钟内没有收到，请重试其他方法</span></li>
		  <li>{L('短信校验码')}：<input type="text" placeholder="" required name="mobile_verify" class="input"/></li>
		  <li><input type="submit" name="dosubmit" value="下一步" class="submit"></li>
		  </ul>
		  <input type="hidden" name="step" value="3">
		  </form>
<script type="text/javascript">
<!--
	function get_verify() {
		$.ajax({
			type: "POST",
			dataType: "json",
			url: "api.php?op=sms",
			data: {session_code:'{get_captcha()}',{SYS_TOKEN_NAME}:'{csrf_hash()}',random:Math.random()},
			success: function(json) {
				if (json.code) {
					$("#mobile_div").hide();
					$("#mobile_send").show();
				} else {
					dr_tips(json.code, json.msg);
				}
			}
		});
	}
//-->
</script>
						
		</div>				
  </div>
  {/if}
  <div class="main_right">
	<p>{L('already_have_account')}</p>
	<br>			
	<p><a href="{APP_PATH}index.php?m=member&c=index&a=login" class="button">{L('login')}</a></p>  
  </div>
</div>
<!--网站底部-->
<div class="footer">
  <p>Powered by <strong><a href="http://www.kaixin100.cn" target="_blank">Kaixin100</a></strong> <em>{get_pc_version(1)}</em> &copy; {date('Y', SYS_TIME)} <img src="{IMG_PATH}copyright.gif"/></p>
</div>
</body>
</html>